﻿////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// <copyright>Copyright 2008-2011 Andreas Huber Doenni</copyright>
// Distributed under the Microsoft Public License (Ms-PL).
// See accompanying file License.txt or copy at http://mews.codeplex.com/license.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

namespace Mews
{
    using System;
    using System.Windows.Forms;

    /// <summary>The form that queries server name and credentials for the test server.</summary>
    internal sealed partial class TestServerForm : Form
    {
        internal TestServerForm(string serverName, string accountName, string password)
        {
            this.InitializeComponent();
            this.serverNameTextBox.Text = serverName;
            this.accountNameTextBox.Text = accountName;
            this.passwordTextBox.Text = password;
        }

        internal string ServerName
        {
            get { return this.serverNameTextBox.Text; }
        }

        internal string AccountName
        {
            get { return this.accountNameTextBox.Text; }
        }

        internal string Password
        {
            get { return this.passwordTextBox.Text; }
        }

        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        private void OnDoneMenuItem_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;
            this.Close();
        }

        private void OnCancelMenuItem_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
            this.Close();
        }
    }
}